#include <iostream>
#include "Matrix.h"

int main()
{
    int m;
    std::cin>>m;
    RowVector R(m);
    R.putMatrix();

    int n;
    std::cin>>n;
    RowVector R1(n);
    R1.putMatrix();
    RowVector R2(R*R1);
    R2.print();

    return 0;
}
